import React, {Component} from 'react'
import {Link} from "react-router-dom"

export default class BaseuserInfo extends Component {
  constructor (props){
   super(props)
   this.state= {}
}
defaultProps= {
  user:{}
}

   render() {
     var user = this.props.user
              if(!user.get('auth').get('isLogin')) {
                return <Link to="/login"><p>立即登录/注册</p></Link>
             }else{
              return  <div>
                       <h2>账号：{user.get('auth').get("userName")}</h2>
                       <h3>余额：<span className="red">{user.get('info').userMoney}</span>元</h3>
                    </div>
            }
  
   }
}